3.1.4 \(\int (d+c d x) (a+b \tanh ^{-1}(c x)) \, dx\) [4]

Optimal. Leaf size=44 \[ \frac {b d x}{2}+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c} \]

[Out]

1/2*b*d*x+1/2*d*(c*x+1)^2*(a+b*arctanh(c*x))/c+b*d*ln(-c*x+1)/c

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {6063, 641, 45} \begin {gather*} \frac {d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c}+\frac {b d x}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + c*d*x)*(a + b*ArcTanh[c*x]),x]

[Out]

(b*d*x)/2 + (d*(1 + c*x)^2*(a + b*ArcTanh[c*x]))/(2*c) + (b*d*Log[1 - c*x])/c

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 641

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c/e)*x)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 6063

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcTanh[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+c d x) \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \frac {(d+c d x)^2}{1-c^2 x^2} \, dx}{2 d}\\ &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \frac {d+c d x}{\frac {1}{d}-\frac {c x}{d}} \, dx}{2 d}\\ &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \left (-d^2-\frac {2 d^2}{-1+c x}\right ) \, dx}{2 d}\\ &=\frac {b d x}{2}+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(95\) vs. \(2(44)=88\).
time = 0.01, size = 95, normalized size = 2.16 \begin {gather*} a d x+\frac {b d x}{2}+\frac {1}{2} a c d x^2+b d x \tanh ^{-1}(c x)+\frac {1}{2} b c d x^2 \tanh ^{-1}(c x)+\frac {b d \log (1-c x)}{4 c}-\frac {b d \log (1+c x)}{4 c}+\frac {b d \log \left (1-c^2 x^2\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + c*d*x)*(a + b*ArcTanh[c*x]),x]

[Out]

a*d*x + (b*d*x)/2 + (a*c*d*x^2)/2 + b*d*x*ArcTanh[c*x] + (b*c*d*x^2*ArcTanh[c*x])/2 + (b*d*Log[1 - c*x])/(4*c)
 - (b*d*Log[1 + c*x])/(4*c) + (b*d*Log[1 - c^2*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 70, normalized size = 1.59

method result size
derivativedivides \(\frac {d a \left (\frac {1}{2} c^{2} x^{2}+c x \right )+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+b c d x \arctanh \left (c x \right )+\frac {d b c x}{2}+\frac {3 d b \ln \left (c x -1\right )}{4}+\frac {d b \ln \left (c x +1\right )}{4}}{c}\) \(70\)
default \(\frac {d a \left (\frac {1}{2} c^{2} x^{2}+c x \right )+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+b c d x \arctanh \left (c x \right )+\frac {d b c x}{2}+\frac {3 d b \ln \left (c x -1\right )}{4}+\frac {d b \ln \left (c x +1\right )}{4}}{c}\) \(70\)
risch \(\frac {d b x \left (c x +2\right ) \ln \left (c x +1\right )}{4}-\frac {d c b \,x^{2} \ln \left (-c x +1\right )}{4}+\frac {d c a \,x^{2}}{2}-\frac {d b x \ln \left (-c x +1\right )}{2}+a d x +\frac {b d x}{2}+\frac {3 b d \ln \left (-c x +1\right )}{4 c}+\frac {d b \ln \left (c x +1\right )}{4 c}\) \(89\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*d*x+d)*(a+b*arctanh(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(d*a*(1/2*c^2*x^2+c*x)+1/2*d*b*arctanh(c*x)*c^2*x^2+b*c*d*x*arctanh(c*x)+1/2*d*b*c*x+3/4*d*b*ln(c*x-1)+1/4
*d*b*ln(c*x+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (40) = 80\).
time = 0.26, size = 85, normalized size = 1.93 \begin {gather*} \frac {1}{2} \, a c d x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b c d + a d x + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b d}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/2*a*c*d*x^2 + 1/4*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*b*c*d + a*d*x + 1
/2*(2*c*x*arctanh(c*x) + log(-c^2*x^2 + 1))*b*d/c

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 77, normalized size = 1.75 \begin {gather*} \frac {2 \, a c^{2} d x^{2} + 2 \, {\left (2 \, a + b\right )} c d x + b d \log \left (c x + 1\right ) + 3 \, b d \log \left (c x - 1\right ) + {\left (b c^{2} d x^{2} + 2 \, b c d x\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{4 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/4*(2*a*c^2*d*x^2 + 2*(2*a + b)*c*d*x + b*d*log(c*x + 1) + 3*b*d*log(c*x - 1) + (b*c^2*d*x^2 + 2*b*c*d*x)*log
(-(c*x + 1)/(c*x - 1)))/c

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (37) = 74\).
time = 0.18, size = 75, normalized size = 1.70 \begin {gather*} \begin {cases} \frac {a c d x^{2}}{2} + a d x + \frac {b c d x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + b d x \operatorname {atanh}{\left (c x \right )} + \frac {b d x}{2} + \frac {b d \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b d \operatorname {atanh}{\left (c x \right )}}{2 c} & \text {for}\: c \neq 0 \\a d x & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*c*d*x**2/2 + a*d*x + b*c*d*x**2*atanh(c*x)/2 + b*d*x*atanh(c*x) + b*d*x/2 + b*d*log(x - 1/c)/c +
b*d*atanh(c*x)/(2*c), Ne(c, 0)), (a*d*x, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (40) = 80\).
time = 0.42, size = 211, normalized size = 4.80 \begin {gather*} -c {\left (\frac {b d \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{2}} - \frac {{\left (\frac {2 \, {\left (c x + 1\right )} b d}{c x - 1} - b d\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}} - \frac {b d \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2}} - \frac {\frac {4 \, {\left (c x + 1\right )} a d}{c x - 1} - 2 \, a d + \frac {{\left (c x + 1\right )} b d}{c x - 1} - b d}{\frac {{\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*d*x+d)*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

-c*(b*d*log(-(c*x + 1)/(c*x - 1) + 1)/c^2 - (2*(c*x + 1)*b*d/(c*x - 1) - b*d)*log(-(c*x + 1)/(c*x - 1))/((c*x
+ 1)^2*c^2/(c*x - 1)^2 - 2*(c*x + 1)*c^2/(c*x - 1) + c^2) - b*d*log(-(c*x + 1)/(c*x - 1))/c^2 - (4*(c*x + 1)*a
*d/(c*x - 1) - 2*a*d + (c*x + 1)*b*d/(c*x - 1) - b*d)/((c*x + 1)^2*c^2/(c*x - 1)^2 - 2*(c*x + 1)*c^2/(c*x - 1)
 + c^2))

________________________________________________________________________________________

Mupad [B]
time = 0.86, size = 65, normalized size = 1.48 \begin {gather*} \frac {d\,\left (2\,a\,x+b\,x+2\,b\,x\,\mathrm {atanh}\left (c\,x\right )\right )}{2}+\frac {c\,d\,\left (a\,x^2+b\,x^2\,\mathrm {atanh}\left (c\,x\right )\right )}{2}-\frac {d\,\left (b\,\mathrm {atanh}\left (c\,x\right )-b\,\ln \left (c^2\,x^2-1\right )\right )}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))*(d + c*d*x),x)

[Out]

(d*(2*a*x + b*x + 2*b*x*atanh(c*x)))/2 + (c*d*(a*x^2 + b*x^2*atanh(c*x)))/2 - (d*(b*atanh(c*x) - b*log(c^2*x^2
 - 1)))/(2*c)

________________________________________________________________________________________